/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.mycompany.ingsoc2;

import java.sql.SQLException;
import javax.swing.JComboBox;

/**
 *
 * @author sfreiman
 */
public class VcNuevoController {

    private VcNuevoView nView;
    private VcPrincipalModel pModel;
    private VcPrincipalView pView;

    public VcNuevoController(VcPrincipalView pView, VcNuevoView vista, VcPrincipalModel modelo) throws SQLException {
        this.nView = vista;
        this.pModel = modelo;

        this.nView.agregarListenerCmdGuardar(new VcLstNuevoGuardar(pView, nView, pModel));
        this.nView.cargarGenero(pModel.listarGenero());

    }

    public void mostrarPantalla() {
        this.nView.mostrarPantalla();

    }

    void mostrarPelicula(int peliID) throws SQLException {
        
        this.nView.setPelicula(pModel.mostrarPelicula(peliID));
    }
    

}
